package com.adee.serializer.util;

import java.util.Collection;

public class AnimalUtil {

    public static Animal newAnimal() {
        Cat cat = new Cat(null);
        cat.id = 2;
        return cat;
    }

    private static class Cat implements Animal {

        private long id = 1;

        public Cat(Collection c) {

        }

        @Override
        public void run() {
            System.out.println("小猫在跑..." + id);
        }
    }

}
